"use strict";
var app = getApp();
Page({
    data: {
        range: "",
        village: "",
        nickname: "",
        name: "",
        phone: "",
        detairange: "",
        mark: "",
        indexrange: null,
        indexvillage: null,
        arrayrange: ['美国', '中国', '巴西', '日本'],
        arrayvillage: ['美国', '中国', '巴西', '日本'],
        userInfo: ""
    },
    methods: {},
    onLoad: function () {
        this.setData({
            userInfo: app.globalData.userInfo
        });
    },
    bindPickerChange: function (e) {
        var _a;
        var _that = this;
        this.setData((_a = {},
            _a["index" + e.target.id] = e.detail.value,
            _a[e.target.id] = _that.data["array" + e.target.id][e.detail.value],
            _a));
    },
    inputbtn: function () {
        var _a = this.data, range = _a.range, village = _a.village, nickname = _a.nickname, name = _a.name, phone = _a.phone, mark = _a.mark, detairange = _a.detairange;
        var data = {
            range: range,
            village: village,
            nickname: nickname,
            name: name,
            phone: phone,
            detairange: detairange,
            mark: mark
        };
        wx.showModal({
            title: '提示',
            content: JSON.stringify(data),
            success: function (res) {
                if (res.confirm) {
                    console.log('用户点击confirm');
                }
                else if (res.cancel) {
                    console.log('用户点击取消');
                }
            }
        });
    },
    bindInput: function (e) {
        var _a;
        this.setData((_a = {},
            _a[e.target.id] = e.detail.value,
            _a));
    },
    backPrePage: function () {
        wx.navigateBack({
            delta: 1
        });
    }
});
